package Controller.listeners;

import Controller.ActionManager;
import java.awt.Component;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;


/**
 *
 * @author pieterc
 */
public class Mouse implements MouseListener{

    public void mouseClicked(MouseEvent e) {
        if(e.getButton() == 3){
            JPopupMenu j = new JPopupMenu("popup");
            JMenuItem jmi = new JMenuItem(ActionManager.getDeleteAction());
            jmi.setText("delete");
            JMenuItem jmi2 = new JMenuItem(ActionManager.getFaveAction());
            jmi2.setText("Fave");
            JMenuItem jmi3 = new JMenuItem(ActionManager.getRepeatAction());
            jmi3.setText("Repeat");
            j.add(jmi);
            j.add(jmi2);
            j.add(jmi3);
            j.show(((Component)e.getSource()), e.getX(), e.getY());
        }
    }

    public void mousePressed(MouseEvent e) {
    }

    public void mouseReleased(MouseEvent e) {
    }

    public void mouseEntered(MouseEvent e) {
    }

    public void mouseExited(MouseEvent e) {
    }

}
